package connection

type IBuilder interface {
	GetSessionId() int64
	SetSessionId(sid int64) IBuilder
	Table(table ...string) IBuilder
	// Connection(conn string) IBuilder
	Join(table, onWhere string) IBuilder
	LeftJoin(table, onWhere string) IBuilder
	RightJoin(table, onWhere string) IBuilder
	Where(params ...any) IBuilder
	OrderBy(params ...string) IBuilder
	Skip(offset int) IBuilder
	Take(limit int) IBuilder
	Group(field string) IBuilder
	Having(raw string) IBuilder
	Select(fields ...string) IBuilder
	BindParam(bpToMap map[string]any) IBuilder
	Log() IBuilder
	GetLogSql() string
	Get(dest ...any) []map[string]any
	First(dest ...any) map[string]any
	Count(fieldSql ...string) int64
	Sum(Column string) any
	Value(column string) any
	Pluck(column string) []any
	FetchAll(sql string, bindParam ...any) []map[string]any
	FetchOne(sql string, bindParam ...any) map[string]any
	Insert(save any) (rowsAffect int64, lastInsertId int64)
	InsertMany(list []any) (rowsAffect int64, lastInsertId int64)
	Update(save any) (rowsAffect int64)
	Delete() (rowsAffect int64)
	Execute(sql string, bps ...any) (rowsAffect int64)
}
